package com.itheima.Demo;

import java.io.*;

public class Demo输入转换流 {
    public static void main(String[] args) throws IOException {
        //InputStreamReader(InputStream in, String charsetName) : 创建一个指定字符集的字符流
        //指定用GBK的方式去读取
        InputStreamReader isr  = new InputStreamReader(new FileInputStream("C:\\Users\\97622\\Desktop\\123.txt"),"GBK");
        int i ;
        while ((i=isr.read())!=-1){
            System.out.println((char)i);
        }
        isr.close();
    }



}
